window.onload = function() {
	//除首页外页面右侧图标
    $('.dock .icons li').hover(function(){
    	$(this).addClass('active');
    },function(){
    	$(this).removeClass('active');
    });
    var flag = 'on';
    $('.switch').on('click',function(){
    	if(!$(this).hasClass('off')){
    		$('.dock').addClass('close');
    		$(this).addClass('off');
    	}else{
    		$('.dock').removeClass('close');
    		$(this).removeClass('off');
    	}
    	
    });
    
	var cs = $(".zzk_right").height();
	$(".zzk_left").css("height", cs);
	$(".zzk_caidan").click(function() {
		$(".zzk_lefts").stop().slideToggle();
	})
	var ccs = $(".zzk_right").height();
	//	console.log(ccs);
	$(".zzk_leftz").css("height", ccs);
	//alert(1);
	//productad.html图片轮播
	var galleryTop = new Swiper('.gallery-top', {
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        spaceBetween: 10,
        loop:true,
        loopedSlides: 5, //looped slides should be the same     
    });
    var galleryThumbs = new Swiper('.gallery-thumbs', {
        spaceBetween: 10,
        slidesPerView: 4,
        touchRatio: 0.2,
        loop:true,
        loopedSlides: 5, //looped slides should be the same
        slideToClickedSlide: true
    });
    galleryTop.params.control = galleryThumbs;
    galleryThumbs.params.control = galleryTop;
    
}